package com.rd.student.jiaji.class3.wangyanbo.day0807;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.HashSet;

public class Test1 {
    public static void main(String[] args) throws Exception {
        kaiChou();
    }
    public static void kaiChou() throws Exception {
        HashSet<String> set=new HashSet<>();
        HashSet<String> set1=new HashSet<>();

        while (set.size()<5){
            int a=(int)(1+(Math.random()*35));
            String s=a+"";
            set.add(s);
        }

        while (set1.size()<2){
            int n=(int)(1+(Math.random()*12));
            String s=n+"";
            set1.add(s);
        }

        Writer writer = new FileWriter("C:\\Users\\Lenovo\\IdeaProjects\\untitled1\\daletou.txt");
        for (String i : set) {
            writer.write(i+" ");
        }
        writer.write("|");
        for (String s : set1) {
            writer.write(s+" ");
        }

        writer.close();



    }
}
